import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import Toast from './components/common/toast';

// 代码高亮
import hljs from "highlight.js";
import javascript from "highlight.js/lib/languages/javascript"; //引入语言
import bash from "highlight.js/lib/languages/javascript"; //引入语言
hljs.registerLanguage("javascript", javascript);
hljs.registerLanguage("bash", bash);
import hljsVuePlugin from "@highlightjs/vue-plugin";
import "highlight.js/styles/stackoverflow-light.css";
import "highlight.js/lib/common";
//bootstrap
// Import our custom CSS// Import all of Bootstrap's JS
import "~src/assets/css/style.scss";
import "bootstrap";
import "@popperjs/core";
///pinia
import { createPinia } from "pinia";
// css
// app.config.globalProperties.$echarts = echarts;
// app.config.globalProperties.$message = ElMessage
// 全局组件
const app = createApp(App);
app.config.globalProperties.$Toast = Toast
app.component("hljsVuePlugin", hljsVuePlugin);
app.use(router).use(createPinia()).use(hljsVuePlugin).mount("#app");
